package com.example.clublesson01.login

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.blankj.utilcode.util.ToastUtils
import com.bw.kf.lib_base.base.BaseActivity
import com.example.clublesson01.R
import com.example.clublesson01.databinding.ActivityYzmBinding

@Route(path = "/app/login/YzmActivity")
class YzmActivity : BaseActivity<ActivityYzmBinding,LoginRepo>() {
    override fun iniView() {
        binding.ivClose.setOnClickListener {
            finish()
        }
        binding.btnGetCode.setOnClickListener {
         if (binding.etPhone.text.toString()==""){
             ToastUtils.showLong("手机号不能为空")
         }else{
             ARouter.getInstance().build("/app/login/SendCodeActivity").
             withString("phone",binding.etPhone.text.toString()).
             navigation()
         }
        }
        binding.LoginPassword.setOnClickListener {
            ARouter.getInstance().build("/app/login/LoginActivity").navigation()
        }
    }

    override fun iniData() {
    }

    override fun getViewModel(): Class<LoginRepo> {
        return LoginRepo::class.java
    }

    override fun Layoutid(): Int {
        return R.layout.activity_yzm
    }

}